<template>
  <view class="footer">
    <view class="footerBox">
      <view class="let">
        合计：
        <view class="price"
          >¥
          <view> {{ totalPrice[0] }}</view>
          .{{ totalPrice[1] }}
        </view>
      </view>

      <view class="btn" @click="Emit.$emit('handle', 'submit')">立即下单</view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    totalPrice: {
      type: Array,
      default() {
        return [];
      },
    },
  },

  computed: {},

  methods: {},
};
</script>

<style lang="less" scoped>
.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 9;
  background: #fff;
  padding-bottom: calc(constant(safe-area-inset-bottom));
  padding-bottom: calc(env(safe-area-inset-bottom));
}

.footerBox {
  display: flex;
  align-items: center;
  padding: 0 24rpx;
  height: 112rpx;

  .let {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    color: #f0250e;
  }
}

.price {
  display: flex;
  align-items: flex-end;

  view {
    font-weight: bold;
    font-size: 40rpx;
    font-weight: bold;
    line-height: 1.2;
  }
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 224rpx;
  height: 80rpx;
  background: #f0250e;
  border-radius: 32px;
  color: #fff;
  font-size: 32rpx;
  font-weight: bold;
  background: #f0250e;
}
</style>
